---@diagnostic disable: undefined-field, lowercase-global
console = {}
local timeTicks = {}
local ffi = require "ffi"
ffi.cdef([[
    int GetTickCount();
]])
function console.time(lable)
    lable = lable or "default"
    if not timeTicks[lable] then
        timeTicks[lable] = ffi.C.GetTickCount()
        return true
    end
end

function console.timeEnd(lable)
    lable = lable or "default"
    if timeTicks[lable] then
        local endTime = ffi.C.GetTickCount()
        print((tostring(lable) .. ":") .. tostring(endTime - timeTicks[lable]) .. "ms")
        timeTicks[lable] = nil
    end
end



console.log = print;
